<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class BaseModel extends Model
{
    //

    static public   function func($field='*')
    {
        $CalledClass = get_called_class();
        $query=self::field($field);
        foreach ($CalledClass::$where as $k=>$v){
            if(is_array($v)){
                $query->where($k,$v[0],$v[1]);
            }else{
                $query->where($k,$v);
            }
        }
        return $query;
    }

}
